//
//  RecordHeader.m
//  体育
//
//  Created by  on 2022/10/24.
//

#import "RecordHeader.h"
@interface RecordHeader()
@property (strong, nonatomic) IBOutlet UILabel *name;
@property (strong, nonatomic) IBOutlet UILabel *date;
@property (strong, nonatomic) IBOutlet UILabel *vs;
@property (strong, nonatomic) IBOutlet UILabel *rangfen;
@property (strong, nonatomic) IBOutlet UILabel *zongfen;

@end
@implementation RecordHeader
- (void)awakeFromNib{
    [super awakeFromNib];
    CGRect bounds = CGRectMake(0, 0, SCREEN_WIDTH - 16, 75);
    UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12, 12)];
    CAShapeLayer *layer = [CAShapeLayer layer];
    layer.frame = bounds;
    layer.path = path.CGPath;
    self.layer.mask = layer;
}

- (void)setTitle:(NSString *)title{
    _title = title;
    self.name.text = title;
    self.rangfen.hidden = [title isEqualToString:LS(@"未来几场")];
    self.zongfen.hidden = self.rangfen.hidden;
}
@end
